<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title><?php echo $title; ?></title>
    <base href="<?php echo base_url(); ?>">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/bootstrap-table.min.css">
    <link rel="stylesheet" href="css/layout.css">
    <link rel="stylesheet" href="css/iconfont.css">

</head>

<body>
<!-- topNav -->
<?php $this->load->view('include/topNav'); ?>
<!-- sideBar -->
<?php $this->load->view('include/sideBar'); ?>

<div class="container-fluid data-main">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h4 class="panel-title">VR列表</h4>
        </div>
        <div class="panel-body">
            <div class="bootstrap-table">
                <!--{ fixed-table-toolbar -->
                <div class="fixed-table-toolbar">
                    <div class="columns columns-left btn-group pull-left">
                        <button class="btn btn-success add-vtour" data-title="添加VR图">
                            <i class="glyphicons glyphicons-plus fn-mr-10"></i>添加VR图
                        </button>
                    </div>
                </div>
                <!--/ fixed-table-toolbar end }-->
                <div class="fixed-table-container">
                    <!--{ fixed-table-body -->
                    <div class="fixed-table-body">
                        <table id="table" class="table-striped table table-hover">
                            <thead>
                                <tr>
                                    <th><div class="th-inner">编号</div></th>
                                    <th><div class="th-inner">全景图名</div></th>
                                    <th><div class="th-inner">全景图地址</div></th>
                                    <!-- <th><div class="th-inner">状态(显示/隐藏)</div></th> -->
                                    <th><div class="th-inner">操作</div></th>
                                </tr>
                            </thead>
                            <tbody id="td_list">
                                <?php foreach ($list as $key => $v): ?>
                                    <tr>
                                        <td><div class="td-inner-tx"><?php echo $v['id'];?></div></td>
                                        <td><div class="td-inner-tx"><?php echo $v['name'];?></div></td>
                                        <td><div class="td-inner-tx"><?php echo base_url().$v['vtour_view'];?></div></td>
                                        <!-- <td><div class="td-inner-tx"><?php echo $this->config->item('status')[$v['status']];?></div></td> -->
                                        <td>
                                            <a class="btn btn-primary btn-sm"  href="<?php echo base_url().$v['vtour_view'];?>">
                                                预览
                                            </a>
                                            <a class="btn btn-primary btn-sm"  href="<?php echo base_url().$v['vtour_site'];?>">
                                                <i class="glyphicons glyphicons-pencil fn-mr-5"></i>编辑
                                            </a>
                                        </td>
                                    </tr>
                                <?php endforeach ?>                            
                            </tbody>
                        </table>
                    </div>
                    <!--/ fixed-table-body end }-->
                </div>
                <!--{ fixed-table-pagination -->
                <div class="fixed-table-pagination clearfix">
                    <div class="pull-left pagination-detail">
                        <button class="btn btn-success add-vtour" data-title="添加VR图">
                            <i class="glyphicons glyphicons-plus fn-mr-10"></i>添加VR图
                        </button>
                        <!-- <input id="feature" class="form-control" name="feature" type="file"> -->
                    </div>                   
                </div>
                <!--/ fixed-table-pagination }-->
            </div>
            <!--/ bootstrap-table end -->
        </div>
        <!--/ panel-body end -->
    </div>
    <!--/ panel end -->
</div>

<script src="/js/plugins/jquery.js"></script>
<script src="/js/plugins/bootstrap.min.js"></script>
<script src="/js/plugins/layer/layer.js"></script>
<script src="/js/common.js"></script>
<script>
    $(function(){
        // 添加VR
        $(document).on('click', '.add-vtour', function () {
            layer.open({
                type: 2,
                title: '添加VR',
                shade: 0.5,
                move: false,
                area: ['80%', '80%'],
                content: 'vtour/add'
            });
        });
    })
</script>
</body>
